﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Main.Master" AutoEventWireup="true" CodeBehind="EmailTaskList.aspx.cs" Inherits="CARMS.Email.EmailTaskList" %>
<%@ Import Namespace="CARMSBusiness.InterFace"%>
<%@ Register Src="~/Controls/GridPager.ascx" TagName="GridPager" TagPrefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server"><table border="0" cellpadding="5" cellspacing="0" width="100%">
    <tr>
        <td>
            <fieldset>
                <legend>Email Task List</legend>
                <vs:GridView ID="gridList" runat="server" AutoGenerateColumns="False" AllowSorting="True"
                    OnRowDataBound="gridList_RowDataBound" OnRowCommand="gridList_OnRowCommand">
                    <Columns>
                   
                        <vs:TemplateField HeaderText="Subject" SortExpression="Subject" >
                            <ItemTemplate>
                                <div class="divHidden" style="width: 200px;" title='<%#Eval("Subject") %>'>
                                    <%#Eval("Subject")%>
                                </div>
                            </ItemTemplate>
                        </vs:TemplateField>
                        <vs:TemplateField HeaderText="Mail To"  SortExpression="MailTo"  >
                            <ItemTemplate>
                                <div class="divHidden" style="width: 100px;" title='<%#Eval("MailTo")%>'>
                                    <%#Eval("MailTo")%>
                                </div>
                            </ItemTemplate>
                        </vs:TemplateField>
                        <vs:TemplateField HeaderText="Mail Cc" SortExpression="MailCc" >
                            <ItemTemplate>
                                <div class="divHidden" style="width: 100px;" title='<%#Eval("MailCc")%>'>
                                    <%#Eval("MailCc")%>
                                </div>
                            </ItemTemplate>
                        </vs:TemplateField>
                        <vs:TemplateField HeaderText="Create Date" SortExpression="CreateDate">
                            <ItemTemplate>
                                <div class="divHidden" style="width: 100px;" title='<%#Eval("CreateDate")%>'>
                                    <%#((DateTime)Eval("CreateDate")).ToString(ApplicationConfiguration.DateTimeFormat)%>
                                </div>
                            </ItemTemplate>
                        </vs:TemplateField>
                        <vs:TemplateField HeaderText="Status" SortExpression="Status">
                            <ItemTemplate>
                                <%#Eval("Status").ToString()=="1" ? "Sent" : "Pending"%>
                            </ItemTemplate>
                        </vs:TemplateField>
                        
                        <vs:TemplateField HeaderText="Operation" ItemStyle-Width="80px">
                            <ItemTemplate>
                                <asp:ImageButton ID="btnViewEmail" runat="server" SkinID="ViewDetail"  ToolTip="View Detail"/> 
                            </ItemTemplate>
                        </vs:TemplateField>
                    </Columns>
                </vs:GridView>
                <uc1:GridPager ID="PageQueryAdapter1" runat="server" OnPerformGetCondition="PageQueryAdapter1_PerformGetCondition"
                    OnPerformGetRecordCount="PageQueryAdapter1_PerformGetRecordCount" OnPerformGetPageData="PageQueryAdapter1_PerformGetPageData"
                    TargetControlID="gridList" PageSize="100" />
            </fieldset>
        </td>
    </tr>
</table>
</asp:Content>
